home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- VLab.mcc/--background--
- VLab.mcc/MUIA_VLab_Height
- VLab.mcc/MUIA_VLab_Left
- VLab.mcc/MUIA_VLab_Monitor
- VLab.mcc/MUIA_VLab_MonitorObject
- VLab.mcc/MUIA_VLab_Top
- VLab.mcc/MUIA_VLab_Width
- VLab.mcc/MUIM_VLab_AllocRGBBuffer
- VLab.mcc/MUIM_VLab_AllocYUVBuffer
- VLab.mcc/MUIM_VLab_DeInterlace
- VLab.mcc/MUIM_VLab_FindHardware
- VLab.mcc/MUIM_VLab_FreeRGBBuffer
- VLab.mcc/MUIM_VLab_FreeYUVBuffer
- VLab.mcc/MUIM_VLab_Grab
- VLab.mcc/MUIM_VLab_MonitorOff
- VLab.mcc/MUIM_VLab_MonitorOn
- VLab.mcc/MUIM_VLab_YUVtoRGB
- VLab.mcc/--background-- VLab.mcc/--background--
-
- PURPOSE
- To grab images from a VLab card.
-
- Features:
- Grabbing of images from a VLab card.
- The option of buffering images on disk (VMem) or in memory.
- YUV to RGB conversion
-
- THANKYOUS
- Many thanks to
- Paul Huxham
- - For his expertise and incredible knowledge of the Amiga platform.
-
- Frank Mariak
- - For his modified vlab.library and help with the monitor.
-
- Stefan Stuntz
- - For MUI!
-
- Debra Quartly
- - For her love and patience.
-
- AUTHOR
- You can contact the author via:
- email: steveq@mafeking.scouts.org.au
- or
- 1280 Stevens St
- Mundaring,
- Western Australia 6073
-
- VLab.mcc/MUIA_VLab_Height VLab.mcc/MUIA_VLab_Height
-
- NAME
- MUIA_VLab_Height -- [..G], LONG
-
- FUNCTION
- You can use this to read the current height in the settings.
- This is used by the grab function
-
- BUGS
- None known.
-
- SEE ALSO
- MUIA_VLab_Top, MUIA_VLab_Left, MUIA_VLab_Width
- VLab.mcc/MUIA_VLab_Left VLab.mcc/MUIA_VLab_Left
-
- NAME
- MUIA_VLab_Left -- [..G], LONG
-
- FUNCTION
- You can use this to read the current left position in the settings.
- This is used by the grab function
-
- BUGS
- None known.
-
- SEE ALSO
- MUIA_VLab_Top, MUIA_VLab_Width, MUIA_VLab_Height
- VLab.mcc/MUIA_VLab_Monitor VLab.mcc/MUIA_VLab_Monitor
-
- NAME
- MUIA_VLab_Monitor -- [.S.], LONG.
-
- FUNCTION
- This is used to run or stop the monitor while it is active.
- Handy to reduce CPU usage while doing CPU intensive work.
-
- Use either of the 2 special values:
- MUIV_VLab_MonitorRun
- MUIV_VLab_MonitorStop
-
- If you have turned on the monitor with MUIM_VLab_MonitorOn then
- you just pass this tag and value to your VLabObject.
-
- EG:
- {
- Object *vlabObj;
-
- vlabObj = VLabObject, End;
-
- if( vlabObj )
- {
- DoMethod( app, OM_ADDMEMBER, vlabObj );
-
- /* Open a window with a monitor.*/
- DoMethod( vlabObj, MUIM_VLab_MonitorOn );
-
- set( vlabObj, MUIA_VLab_Monitor, MUIV_VLab_MonitorStop );
- }
- }
-
- If you have turned on the monitor with MUIA_VLab_MonitorObject
- and have attached it to your own window, then you just pass this
- tag and value to the object that was returned by the
- MUIA_VLab_MonitorObject call.
-
- EG:
- {
- Object *vlabObj, *vlabMonitor, *vlabWindow;
-
- vlabObj = VLabObject, End;
-
- if( vlabObj )
- {
- DoMethod( app, OM_ADDMEMBER, vlabObj );
-
- get( vlabObj, MUIA_VLab_MonitorObject, &vlabMonitor );
-
- if ( vlabMonitor )
- {
- vlabWindow = WindowObject,
- MUIA_Window_Title, "VLab Monitor",
- MUIA_Window_ID, MAKE_ID('V','L','A','B'),
- WindowContents, VGroup,
- Child, vlabMonitor,
- End,
- End;
-
- if ( vlabWindow )
- {
- DoMethod( app, OM_ADDMEMBER, vlabWindow );
-
- /* Stop (pause) the monitor.*/
- set( vlabMonitor, MUIA_VLab_Monitor, MUIV_VLab_MonitorStop );
- }
- }
- }
- }
-
-
- BUGS
- None known.
-
- SEE ALSO
- MUIM_VLab_MonitorOn, MUIM_VLab_MonitorOff
- VLab.mcc/MUIA_VLab_MonitorObject VLab.mcc/MUIA_VLab_MonitorObject
-
- NAME
- MUIA_VLab_MonitorObject -- [..G], Object *
-
- FUNCTION
- This will return a pointer to a monitor object. This monitor object can
- then be attached to a window, which will then display a monitor. The
- advantage of this over MUIM_VLab_MonitorOn is that it will open in the
- window of your choice, rather than a separate window. The object pointer
- then belongs to you. It is your responsibility to dispose of it when you
- are finished with it.
-
- It is worthwhile noting that the monitor is not terribly practical when it
- comes to making grabs. By the time you see the frame on the monitor, it has
- already gone, therefore the frame you grab will not be the one you see.
-
- EG:
- {
- Object *vlabObj, *vlabMonitor, *vlabWindow;
-
- vlabObj = VLabObject, End;
-
- if( vlabObj )
- {
- DoMethod( app, OM_ADDMEMBER, vlabObj );
-
- get( vlabObj, MUIA_VLab_MonitorObject, &vlabMonitor );
-
- if ( vlabMonitor )
- {
- vlabWindow = WindowObject,
- MUIA_Window_Title, "VLab Monitor",
- MUIA_Window_ID, MAKE_ID('V','L','A','B'),
- WindowContents, VGroup,
- Child, vlabMonitor,
- End,
- End;
-
- if ( vlabWindow )
- {
- DoMethod( app, OM_ADDMEMBER, vlabWindow );
-
- /* The monitor is now running in your window.*/
- }
- }
- }
- }
-
- BUGS
- None known.
-
- SEE ALSO
- MUIM_VLab_MonitorOn, MUIM_VLab_MonitorOff
- VLab.mcc/MUIA_VLab_Top VLab.mcc/MUIA_VLab_Top
-
- NAME
- MUIA_VLab_Top -- [..G], LONG
-
- FUNCTION
- You can use this to read the current top position in the settings.
- This is used by the grab function
-
- BUGS
- None known.
-
- SEE ALSO
- MUIA_VLab_Left, MUIA_VLab_Width, MUIA_VLab_Height
- VLab.mcc/MUIA_VLab_Width VLab.mcc/MUIA_VLab_Width
-
- NAME
- MUIA_VLab_Width -- [..G], LONG
-
- FUNCTION
- You can use this to read the current width in the settings.
- This is used by the grab function
-
- BUGS
- None known.
-
- SEE ALSO
- MUIA_VLab_Top, MUIA_VLab_Left, MUIA_VLab_Height
- VLab.mcc/MUIM_VLab_AllocRGBBuffer VLab.mcc/MUIM_VLab_AllocRGBBuffer
-
- NAME
- MUIM_VLab_AllocRGBBuffer -- Allocate enough memory to store a RGB image.
-
- SYNOPSIS
- result = DoMethod( obj, MUIM_VLab_AllocRGBBuffer, &rgb )
-
- ULONG DoMethod( Object *obj, MUIM_VLab_AllocRGBBuffer, UBYTE **rgb )
-
- FUNCTION
- This method will return a pointer to enough memory to store a grabbed image.
- that needs to be converted to RGB.
- You will probably never need this function, as VLabImage.mcc does this
- internally.
- It is included for the sake of completeness.
-
- EG:
- {
- Object *vlabObj;
- LONG *rgb, width, height;
-
- vlabObj = VLabObject, End;
-
- if( vlabObj )
- {
- DoMethod( app, OM_ADDMEMBER, vlabObj );
-
- get( vlabObj, MUIA_VLab_Width, &width );
- get( vlabObj, MUIA_VLab_Height, &height );
-
- if ( DoMethod( vlabObj, MUIM_VLab_AllocRGBBuffer, &rgb, width,
- height ) == VLABERR_OK )
- {
- /* Buffer alloc'ed ok!*/
- }
- }
- }
-
-
- INPUTS
- rgb - Pointer to a where to store the rgb pointer.
-
- RESULT
- VLABERR_OK - if successful
- An error code if unsuccessful.
- See vlab_mcc.h for possible error codes.
-
- WARNING
- A call to MUIM_VLab_FreeRGBBuffer must be made when you have finished with
- the buffer.
-
- BUGS
- None known.
-
- SEE ALSO
- MUIM_VLab_FreeYUVBuffer, MUIM_VLab_AllocYUVBuffer, MUIM_VLab_FreeRGBBuffer
- VLab.mcc/MUIM_VLab_AllocYUVBuffer VLab.mcc/MUIM_VLab_AllocYUVBuffer
-
- NAME
- MUIM_VLab_AllocYUVBuffer -- Allocate enough memory to store a YUV image.
-
- SYNOPSIS
- result = DoMethod( obj, MUIM_VLab_AllocYUVBuffer, &y, &u, &v )
-
- ULONG DoMethod( Object *obj, MUIM_VLab_AllocYUVBuffer, ULONG **y,
- ULONG **u, ULONG **v )
-
- FUNCTION
- This method will return pointers (y,u,v) to enough memory to store a grabbed
- image. You will probably never need this function, as MUIM_VLab_Grab does
- this internally before a grab.
- It is included for the sake of completeness.
-
- EG:
- {
- Object *vlabObj;
- LONG *y, *u, *v, width, height;
-
- vlabObj = VLabObject, End;
-
- if( vlabObj )
- {
- DoMethod( app, OM_ADDMEMBER, vlabObj );
-
- get( vlabObj, MUIA_VLab_Width, &width );
- get( vlabObj, MUIA_VLab_Height, &height );
-
- if ( DoMethod( vlabObj, MUIM_VLab_AllocYUVBuffer, &y, &u, &v, width,
- height ) == VLABERR_OK )
- {
- /* Buffer alloc'ed ok!*/
- }
- }
- }
-
- INPUTS
- y - Pointer to a where to store the y pointer.
- u - Pointer to a where to store the u pointer.
- v - Pointer to a where to store the v pointer.
-
- RESULT
- VLABERR_OK - if successful
- An error code if unsuccessful.
- See vlab_mcc.h for possible error codes.
-
- WARNING
- A call to MUIM_VLab_FreeYUVBuffer must be made when you have finished with
- the buffer.
-
- BUGS
- None known.
-
- SEE ALSO
- MUIM_VLab_FreeYUVBuffer, MUIM_VLab_AllocRGBBuffer, MUIM_VLab_FreeRGBBuffer
- VLab.mcc/MUIM_VLab_DeInterlace VLab.mcc/MUIM_VLab_DeInterlace
-
- NAME
- MUIM_VLab_DeInterlace -- DeInterlace a RGB buffer.
-
- SYNOPSIS
- result = DoMethod( obj, MUIM_VLab_DeInterlace, rgb, width, height,
- modulo, pixinc, mode )
-
- ULONG DoMethod( Object *obj, MUIM_VLab_DeInterlace, UBYTE *rgb, LONG width,
- LONG height, LONG modulo, LONG pixinc, LONG mode )
-
- FUNCTION
- Digitized full frame images often have big differences between their
- two half frames caused by quickly moving objects. This function
- removes such effects by reducing the vertical resolution at these
- locations (and only there).
-
- INPUTS
- rgb - Pointer to a rgb buffer.
- width - The width of the image.
- height - The height ot the image.
- modulo - The number of bytes to add to go exactly one line down.
- pixInc - The number of bytes to add to go to the next pixel.
- mode - Mode must be one of these:
- DIM_EVEN - Use the even frame to reduce flickering.
- DIM_EVEN provides the best results and
- should be used as a default.
- DIM_ODD - Use the odd frame to reduce flickering.
- DIM_MIX - Mix both frames.
- DIM_SET - Set pixel to 255 for demonstration or debugging.
-
- RESULT
- VLABERR_OK - if successful
- An error code if unsuccessful.
- See vlab_mcc.h for possible error codes.
-
- WARNING
- Do not Deinterlace any buffer returned to you by
- MUIM_VLabImage_ObtainRGBPointer, copy it first and Deinterlace the copy.
-
- BUGS
-
- SEE ALSO
-
- VLab.mcc/MUIM_VLab_FindHardware VLab.mcc/MUIM_VLab_FindHardware
-
- NAME
- MUIM_VLab_FindHardware -- Look for a VLab card
-
- SYNOPSIS
- result = DoMethod( obj, MUIM_VLab_FindHardware )
-
- ULONG DoMethod( Object *obj, MUIM_VLab_FindHardware )
-
- FUNCTION
- This method merely tests to see if input 1 is available, if it is not
- then it is assumed that no VLab card is plugged in.
-
- INPUTS
-
- RESULT
- TRUE - if input 1 is found.
- FALSE - if input 1 is not found.
-
- WARNING
-
- BUGS
- None known.
-
- SEE ALSO
-
- VLab.mcc/MUIM_VLab_FreeRGBBuffer VLab.mcc/MUIM_VLab_FreeRGBBuffer
-
- NAME
- MUIM_VLab_FreeRGBBuffer -- Free a previously allocated RGB buffer.
-
- SYNOPSIS
- result = DoMethod( obj, MUIM_VLab_FreeRGBBuffer, rgb )
-
- ULONG DoMethod( Object *obj, MUIM_VLab_FreeRGBBuffer, UBYTE *rgb )
-
- FUNCTION
- This method will frees a previously allocated rgb pointer.
-
- INPUTS
- rgb - Pointer to the buffer.
-
- RESULT
-
- WARNING
-
- BUGS
- None known.
-
- SEE ALSO
- MUIM_VLab_AllocYUVBuffer, MUIM_VLab_AllocRGBBuffer, MUIM_VLab_FreeYUVBuffer
- VLab.mcc/MUIM_VLab_FreeYUVBuffer VLab.mcc/MUIM_VLab_FreeYUVBuffer
-
- NAME
- MUIM_VLab_FreeYUVBuffer -- Free a previously allocated YUV buffer.
-
- SYNOPSIS
- result = DoMethod( obj, MUIM_VLab_FreeYUVBuffer, y, u, v )
-
- ULONG DoMethod( Object *obj, MUIM_VLab_FreeYUVBuffer, ULONG *y, ULONG *u,
- ULONG *v )
-
- FUNCTION
- This method will frees previously allocated y,u,v pointers.
-
- INPUTS
- y - Pointer to the y buffer.
- u - Pointer to the u buffer.
- v - Pointer to the v buffer.
-
- RESULT
-
- WARNING
-
- BUGS
- None known.
-
- SEE ALSO
- MUIM_VLab_AllocYUVBuffer, MUIM_VLab_AllocRGBBuffer, MUIM_VLab_FreeRGBBuffer
- VLab.mcc/MUIM_VLab_Grab VLab.mcc/MUIM_VLab_Grab
-
- NAME
- MUIM_VLab_Grab -- Grab a frame from the VLab card
-
- SYNOPSIS
- result = DoMethod( obj, MUIM_VLab_Grab, &vlabImage )
-
- ULONG DoMethod( Object *obj, MUIM_VLab_Grab, Object **vlabImage )
-
- FUNCTION
- Calling this method will grab a frame from the input of the VLab card.
- If the grab was successful then vlabImage will point to a vlabImage object.
- If the grab was unsuccessful then vlabImage will be NULL.
-
- EG:
- {
- Object *vlabObj, *vlabImage;
-
- ULONG result;
-
- vlabObj = VLabObject, End;
-
- if( vlabObj )
- {
- DoMethod( app, OM_ADDMEMBER, vlabObj );
-
- result = DoMethod( vlabObj, MUIM_VLab_Grab, &vlabImage );
-
- if ( result == VLABERR_OK )
- {
- /* Grab successful!!! vlabImage has an object pointer to it.*/
- /* Simply attach it to a window! See the demo code.*/
- }
- }
- }
-
- INPUTS
-
- RESULT
- VLABERR_OK - if successful
- An error code if unsuccessful.
- See vlab_mcc.h for possible error codes.
-
- WARNING
-
- BUGS
- None known.
-
- SEE ALSO
-
- VLab.mcc/MUIM_VLab_MonitorOff VLab.mcc/MUIM_VLab_MonitorOff
-
- NAME
- MUIM_VLab_MonitorOff -- Close the monitor window.
-
- SYNOPSIS
- result = DoMethod( obj, MUIM_VLab_MonitorOff )
-
- ULONG DoMethod( Object *obj, MUIM_VLab_MonitorOff )
-
- FUNCTION
- This method will close a previously open monitor window.
-
- INPUTS
-
- RESULT
-
- WARNING
- If MUIA_VLab_MonitorObject was used to open the monitor window, this method
- SHOULD NOT be used to close it.
-
- BUGS
- None known.
-
- SEE ALSO
- MUIM_VLab_MonitorOn, MUIA_VLab_MonitorObject
- VLab.mcc/MUIM_VLab_MonitorOn VLab.mcc/MUIM_VLab_MonitorOn
-
- NAME
- MUIM_VLab_MonitorOn -- Open a window and display a grayscale monitor in it.
-
- SYNOPSIS
- result = DoMethod( obj, MUIM_VLab_MonitorOn )
-
- ULONG DoMethod( Object *obj, MUIM_VLab_MonitorOn )
-
- FUNCTION
- This method will open a window, then add a grayscale monitor to it. Below
- the monitor is a status line. The size of the monitor is set and cannot be
- changed. If the monitor window is already open, calling this method will
- activate and bring the window to the front.
-
- It is worthwhile noting that the monitor is not terribly practical when it
- comes to making grabs. By the time you see the frame on the monitor, it has
- already gone, therefore the frame you grab will not be the one you see.
-
- INPUTS
-
- RESULT
- VLABERR_OK - if successful
- FALSE - if for some reason the window creation failed.
-
- WARNING
- For this method to work, the VLab Object must be added to the application
- prior to this call.
-
- BUGS
- None known.
-
- SEE ALSO
- MUIM_VLab_MonitorOff, MUIA_VLab_MonitorObject
- VLab.mcc/MUIM_VLab_YUVtoRGB VLab.mcc/MUIM_VLab_YUVtoRGB
-
- NAME
- MUIM_VLab_YUVtoRGB -- Convert a YUV buffer to RGB
-
- SYNOPSIS
- result = DoMethod( obj, MUIM_VLab_YUVtoRGB, y, u, v, rgb, width, height )
-
- ULONG DoMethod( Object *obj, MUIM_VLab_YUVtoRGB, ULONG *y, ULONG *u,
- ULONG *v, UBYTE *rgb, LONG width, LONG height )
-
- FUNCTION
- This method converts a grabbed YUV image and converts it to RGB.
- Pointers to y,u,v and rgb buffers must be supplied.
- See MUIM_VLab_AllocYUVBuffer, MUIM_VLab_AllocRGBBuffer. Normally
- you won't need to call this function as VLabImage.mcc handles this
- internally.
- It is included for the sake of completeness.
-
- INPUTS
- y - Pointer to a previously allocated y buffer.
- u - Pointer to a previously allocated u buffer.
- v - Pointer to a previously allocated v buffer.
- rgb - Pointer to a previously allocated rgb buffer.
- width - The width of the image.
- height - The height ot the image.
-
- RESULT
-
- WARNING
-
- BUGS
- None known.
-
- SEE ALSO
-
-